<template>
  <div id="app">
    <van-nav-bar
      fixed
      :title="msg"
      left-text="返回"
      right-text="按钮"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    />
    <router-view></router-view>
    <van-tabbar v-model="active">
      <van-tabbar-item icon="home-o" to="/home"></van-tabbar-item>
      <van-tabbar-item icon="friends-o" to="/friends"></van-tabbar-item>
      <van-tabbar-item icon="cart-o" badge="0" to="/carts"></van-tabbar-item>
      <van-tabbar-item icon="search" to="/search"></van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  data: () => ({
    msg: '兰兰的网页',
    active: '0'
  }),
  methods: {
    onClickLeft() {
      // 返回上一页
      this.$router.go(-1)
    },
    onClickRight() {

    }
  }
}
</script>
<style lang="scss" scoped>
.app{
  padding-bottom: 50px;
  padding-top: 46px;
}
</style>